#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QSystemTrayIcon>
#include <QGSettings/QGSettings>
#include <QApplication>
#include <QDesktopWidget>
#include <KWindowSystem>
#include <QDebug>
#include <QScreen>

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();
    void showMainWidget();
    QList<int> getWorkAreaGeometry();
    WId getDockWid();
    int getPanelPosition();

    enum PanelPos{
      bottom = 0,
      top,
      left,
      right

    };

    void updataWidgetPos();
private slots:
    void ActiveTray(QSystemTrayIcon::ActivationReason reason);

private:
    WId m_dockId;
    int m_panelPosition;
    Ui::Widget *ui;
    QSystemTrayIcon *m_trayicon;
    QGSettings *m_gsetting;

};
#endif // WIDGET_H
